import layoutRouter from '@/layout/router';
import frontLayout from '@/layout/front/index';
export default [{
	path: '/front',
	name: 'Front',
	redirect: '/front/index',
	meta: {
		title: '首页'
	},
	component: frontLayout,
	children: [{
		path: 'index',
		name: 'frontIndex',
		meta: {
			title: '前台首页'
		},
		component: () => import('@/views/front/index/index')
	}, {
		path: 'trainingResources',
		name: 'frontTrainingResources',
		redirect: '/front/trainingResources/',
		meta: {
			title: '在线学习'
		},
		component: () => import('@/views/front/trainingResources/index'),
		children: [{
			path: '/',
			name: 'frontTrainingResourcesList',
			component: () => import('@/views/front/trainingResources/list/index')
		}, {
			path: ':id',
			name: 'frontTrainingResourcesDetail',
			meta: {
				title: '课程详情'
			},
			component: () => import('@/views/front/trainingResources/detail/index')
		}]
	}, {
		path: 'learnCenter',
		name: 'frontLearnCenter',
		redirect: '/front/learnCenter/personal',
		meta: {
			title: '学习中心'
		},
		component: () => import('@/views/front/learnCenter/index'),
		children: [{
			path: 'personal',
			name: 'frontLearnCenterPersonal',
			meta: {
				title: '个人信息'
			},
			component: () => import('@/views/front/learnCenter/personal')
		}, {
			path: 'course',
			name: 'frontLearnCenterCourse',
			meta: {
				title: '必修课程'
			},
			component: () => import('@/views/front/learnCenter/course')
		}, {
			path: 'exam',
			name: 'frontLearnCenterExam',
			meta: {
				title: '考试记录'
			},
			component: () => import('@/views/front/learnCenter/exam')
		}, {
			path: 'collect',
			name: 'frontLearnCenterCollect',
			meta: {
				title: '我的收藏'
			},
			component: () => import('@/views/front/learnCenter/collect')
		}]
	}, {
		path: 'userCenter',
		name: 'frontUserCenter',
		meta: {
			title: '个人中心'
		},
		redirect: '/front/userCenter/message',
		component: () => import('@/views/front/userCenter/index'),
		children: [{
			path: 'message',
			name: 'frontUserCenterMessage',
			redirect: '/front/userCenter/message/list',
			component: layoutRouter,
			children: [{
				path: 'list',
				name: 'frontUserCenterMessageList',
				meta: {
					title: '消息列表'
				},
				component: () => import('@/views/front/userCenter/message/list')
			}, {
				path: 'add',
				name: 'frontUserCenterMessageAdd',
				meta: {
					title: '消息添加'
				},
				component: () => import('@/views/front/userCenter/message/add')
			}, {
				path: ':id',
				name: 'frontUserCenterMessageDetail',
				meta: {
					title: '消息详情'
				},
				component: () => import('@/views/front/userCenter/message/detail')
			}]
		}, {
			path: 'component',
			name: 'frontUserCenterComponent',
			meta: {
				title: '组件管理'
			},
			component: () => import('@/views/front/userCenter/component')
		}]
	}, {
		path: 'courseExam',
		name: 'frontCourseExam',
		meta: {
			title: '课程考试',
			isFooter: true
		},
		component: () => import('@/views/front/exam/index')
	}]
}]